#ifndef VIDEOCAPTURE_OPENCVHIGHGUI_H
#define VIDEOCAPTURE_OPENCVHIGHGUI_H
#ifndef NO_HIGHGUI_CAM

#include <opencv/highgui.h>
#include "CameraInterfaceBase.h"

class OpenCvHighGui : public CameraInterface {
public:
	OpenCvHighGui();
	~OpenCvHighGui();
	int probeCam(unsigned long manualIPaddress = (130 << 24) | (123 << 16) | (248 << 8) | (16) );
	bool getCamId(int index, unsigned long &camId, std::string *camName = NULL);
	bool openCam(unsigned long camId);
	bool getCamProperties(unsigned long propId, double &value);
	bool setCamProperties(unsigned long propId, double value);
	bool setImageSize(unsigned int width = 640, unsigned int height = 480, unsigned int bytesPerChannel = 1, unsigned int channels = 3);
	IplImage* grabRawImage();
	bool closeCam();
private:
	CvCapture *cam;
	std::vector<int> camList;
};

#endif
#endif